package com.sg.service.biz.pbff.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.pbff.req.*;
import com.sg.dto.biz.pbff.res.*;
import com.sg.service.biz.pbff.CycleTypeService;
import com.wicket.okrapp.integration.CycleTypeService;
import com.wicket.okrapp.integration.dto.*;
import com.wicket.okrframework.integration.InductionRecordService;
import com.wicket.okrframework.integration.dto.*;
import com.sg.common.exception.Assert;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class CycleTypeServiceImpl implements CycleTypeService {

    @Resource
    com.sg.service.biz.app.CycleTypeService fwAppCycleTypeClient;
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;
    @Resource
    private RedisUtil redisUtil;

    /**
     * B3-4新增周期类型（平台）[1857]
     * gen by moon at 8/26/2022, 2:42:19 PM
     */
    @Trace(operationName = "B3-4新增周期类型（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddCycleTypeRespDto addCycleType(BffAddCycleTypeReqDto reqDto) {


        AddCycleTypeRespDto addCycleTypeRespDto_1 = null;
//步骤0: D3-4新增周期类型 - addCycleType
        AddCycleTypeRespDto addCycleTypeRespDto = null;
        AddCycleTypeReqDto addCycleTypeReqDto = new AddCycleTypeReqDto();
        if (reqDto != null) {
            addCycleTypeReqDto.setCycleTypeName(reqDto.getCycleTypeName());//sourceId:57428_1
            addCycleTypeReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//sourceId:57426_1
            addCycleTypeReqDto.setCycleSystemCode(reqDto.getCycleSystemCode());//sourceId:57425_1
            addCycleTypeReqDto.setIsWorkCycleType(reqDto.getIsWorkCycleType());//sourceId:57430_1
            addCycleTypeReqDto.setCycleTypeUsage(reqDto.getCycleTypeUsage());//sourceId:57431_1
            addCycleTypeReqDto.setCycleTypeStandard(reqDto.getCycleTypeStandard());//sourceId:57429_1
            addCycleTypeReqDto.setCustomCycleTypeCode(reqDto.getCustomCycleTypeCode());//sourceId:103349_1
            addCycleTypeReqDto.setCustomCycleTypeNum(reqDto.getCustomCycleTypeNum());//sourceId:103350_1
            addCycleTypeReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:57435_1
        }

        /*D3-4新增周期类型[1853]   */
        Assert.isNull(addCycleTypeReqDto.getCycleTypeName(), "B3-4新增周期类型（平台）-D3-4新增周期类型-周期类型名称不能为空", false);
        Assert.isNull(addCycleTypeReqDto.getCycleTypeCode(), "B3-4新增周期类型（平台）-D3-4新增周期类型-周期类型标识不能为空", false);
        Assert.isNull(addCycleTypeReqDto.getCycleSystemCode(), "B3-4新增周期类型（平台）-D3-4新增周期类型-周期体系类型标识不能为空", false);
        Assert.isNull(addCycleTypeReqDto.getIsWorkCycleType(), "B3-4新增周期类型（平台）-D3-4新增周期类型-是否工作周期不能为空", false);
        Assert.isNull(addCycleTypeReqDto.getCycleTypeUsage(), "B3-4新增周期类型（平台）-D3-4新增周期类型-周期类型用途不能为空", false);
        Assert.isNull(addCycleTypeReqDto.getCycleTypeStandard(), "B3-4新增周期类型（平台）-D3-4新增周期类型-周期类型标准化不能为空", false);
        Assert.isNull(addCycleTypeReqDto.getSubjectLifeCycle(), "B3-4新增周期类型（平台）-D3-4新增周期类型-主体生命周期不能为空", false);
        addCycleTypeRespDto = fwAppCycleTypeClient.addCycleType(addCycleTypeReqDto).getData();

        addCycleTypeRespDto_1 = addCycleTypeRespDto;

        BffAddCycleTypeRespDto retData = new BffAddCycleTypeRespDto();
        if (addCycleTypeRespDto_1 != null) {
            retData.setCycleTypeId(addCycleTypeRespDto_1.getCycleTypeId());//sourceId:57448_1
        }


        return retData;
    }

    /**
     * B3-4查询周期详情(平台)[2013]
     * gen by moon at 11/29/2022, 8:06:53 PM
     */
    @Trace(operationName = "B3-4查询周期详情(平台)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleDetailRespDto queryCycleDetail(BffQueryCycleDetailReqDto reqDto) {


        QueryCycleDetailComRespDto queryCycleDetailComRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D3-4查询周期详情(公共) - queryCycleDetailCom
        QueryCycleDetailComRespDto queryCycleDetailComRespDto = null;
        QueryCycleDetailComReqDto queryCycleDetailComReqDto = new QueryCycleDetailComReqDto();
        if (reqDto != null) {
            queryCycleDetailComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:59361_1
            queryCycleDetailComReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:103357_1
        }

        /*D3-4查询周期详情(公共)[2009]   */
        Assert.isNull(queryCycleDetailComReqDto.getCycleId(), "B3-4查询周期详情(平台)-D3-4查询周期详情(公共)-周期ID不能为空", false);
        Assert.isNull(queryCycleDetailComReqDto.getIsArchive(), "B3-4查询周期详情(平台)-D3-4查询周期详情(公共)-是否存档不能为空", false);
        queryCycleDetailComRespDto = fwAppCycleTypeClient.queryCycleDetailCom(queryCycleDetailComReqDto).getData();
        Assert.isTrue(queryCycleDetailComRespDto == null || queryCycleDetailComRespDto.getCycleId() == null, "找不到数据，系统异常", false);

        queryCycleDetailComRespDto_1 = queryCycleDetailComRespDto;

//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
        if (queryCycleDetailComRespDto != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto = new QueryInductionRecordInfoDetailComReqDto();
            if (queryCycleDetailComRespDto != null) {
                queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryCycleDetailComRespDto.getOperationInductionId());//SimpleFieldAssign//sourceId:59377_1
            }

            /*D1-3查询个人就职记录信息详情（公共）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(), "B3-4查询周期详情(平台)-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();


            queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
        }

        BffQueryCycleDetailRespDto retData = new BffQueryCycleDetailRespDto();
        if (queryCycleDetailComRespDto_1 != null) {
            retData.setCycleId(queryCycleDetailComRespDto_1.getCycleId());//SimpleFieldAssign//sourceId:63943_1
            retData.setCycleStandardName(queryCycleDetailComRespDto_1.getCycleStandardName());//SimpleFieldAssign//sourceId:63944_1
            retData.setCycleStartTime(queryCycleDetailComRespDto_1.getCycleStartTime());//SimpleFieldAssign//sourceId:63945_1
            retData.setCycleEndTime(queryCycleDetailComRespDto_1.getCycleEndTime());//SimpleFieldAssign//sourceId:63946_1
            retData.setCycleTypeCode(queryCycleDetailComRespDto_1.getCycleTypeCode());//SimpleFieldAssign//sourceId:63947_1
            retData.setCycleTypeName(queryCycleDetailComRespDto_1.getCycleTypeName());//SimpleFieldAssign//sourceId:376509_1
            retData.setCycleTypeInstanceCode(queryCycleDetailComRespDto_1.getCycleTypeInstanceCode());//SimpleFieldAssign//sourceId:63948_1
            retData.setCycleNumberShortName(queryCycleDetailComRespDto_1.getCycleNumberShortName());//SimpleFieldAssign//sourceId:376510_1
            retData.setCycleSystemCode(queryCycleDetailComRespDto_1.getCycleSystemCode());//SimpleFieldAssign//sourceId:63949_1
            retData.setCycleTypeStandard(queryCycleDetailComRespDto_1.getCycleTypeStandard());//SimpleFieldAssign//sourceId:63950_1
            retData.setSubjectLifeCycle(queryCycleDetailComRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:63951_1
            retData.setOperationInductionId(queryCycleDetailComRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:63952_1
            retData.setOperateTime(queryCycleDetailComRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:63953_1
        }
        if (queryInductionRecordInfoDetailComRespDto_1 != null) {
            retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//SimpleFieldAssign//sourceId:63954_1
            retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:63955_1
            retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:63956_1
            retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:63957_1
        }


        return retData;
    }

    /**
     * B3-4查询周期类型详情（平台）[1883]
     * gen by moon at 8/25/2022, 6:43:09 PM
     */
    @Trace(operationName = "B3-4查询周期类型详情（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleTypeDetailRespDto queryCycleTypeDetail(BffQueryCycleTypeDetailReqDto reqDto) {


        QueryCycleTypeDetailRespDto queryCycleTypeDetailRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
//步骤0: D3-4查询周期类型详情 - queryCycleTypeDetail
        QueryCycleTypeDetailRespDto queryCycleTypeDetailRespDto = null;
        QueryCycleTypeDetailReqDto queryCycleTypeDetailReqDto = new QueryCycleTypeDetailReqDto();
        if (reqDto != null) {
            queryCycleTypeDetailReqDto.setCycleTypeId(reqDto.getCycleTypeId());//sourceId:57564_1
        }

        /*D3-4查询周期类型详情[1882]   */
        Assert.isNull(queryCycleTypeDetailReqDto.getCycleTypeId(), "B3-4查询周期类型详情（平台）-D3-4查询周期类型详情-周期类型ID不能为空", false);
        queryCycleTypeDetailRespDto = fwAppCycleTypeClient.queryCycleTypeDetail(queryCycleTypeDetailReqDto).getData();

        queryCycleTypeDetailRespDto_1 = queryCycleTypeDetailRespDto;

//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
        Assert.isTrue(queryCycleTypeDetailRespDto == null || queryCycleTypeDetailRespDto.getCycleTypeId() == null, "返回值不能为空", false);
        if (queryCycleTypeDetailRespDto != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto = new QueryInductionRecordInfoDetailComReqDto();
            if (queryCycleTypeDetailRespDto != null) {
                queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryCycleTypeDetailRespDto.getOperationInductionId());//sourceId:57582_1
            }

            /*D1-3查询个人就职记录信息详情（公共）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(), "B3-4查询周期类型详情（平台）-D1-3查询个人就职记录信息详情（公共）-就职记录ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();

            queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
        }

        Assert.isTrue(queryCycleTypeDetailRespDto == null || queryCycleTypeDetailRespDto.getCycleTypeId() == null, "返回值不能为空", false);
        BffQueryCycleTypeDetailRespDto retData = new BffQueryCycleTypeDetailRespDto();
        if (queryCycleTypeDetailRespDto_1 != null) {
            retData.setCycleTypeId(queryCycleTypeDetailRespDto_1.getCycleTypeId());//sourceId:57589_1
            retData.setCycleTypeCode(queryCycleTypeDetailRespDto_1.getCycleTypeCode());//sourceId:57591_1
            retData.setCycleTypeNumber(queryCycleTypeDetailRespDto_1.getCycleTypeNumber());//sourceId:57592_1
            retData.setCycleTypeName(queryCycleTypeDetailRespDto_1.getCycleTypeName());//sourceId:57593_1
            retData.setCycleTypeStandard(queryCycleTypeDetailRespDto_1.getCycleTypeStandard());//sourceId:57594_1
            retData.setCycleSystemCode(queryCycleTypeDetailRespDto_1.getCycleSystemCode());//sourceId:57590_1
            retData.setCycleTypeUsage(queryCycleTypeDetailRespDto_1.getCycleTypeUsage());//sourceId:57596_1
            retData.setIsWorkCycleType(queryCycleTypeDetailRespDto_1.getIsWorkCycleType());//sourceId:57595_1
            retData.setCustomCycleTypeCode(queryCycleTypeDetailRespDto_1.getCustomCycleTypeCode());//sourceId:57598_1
            retData.setCustomCycleTypeNum(queryCycleTypeDetailRespDto_1.getCustomCycleTypeNum());//sourceId:57599_1
            retData.setOrderNumber(queryCycleTypeDetailRespDto_1.getOrderNumber());//sourceId:57597_1
            retData.setSubjectLifeCycle(queryCycleTypeDetailRespDto_1.getSubjectLifeCycle());//sourceId:57600_1
            retData.setOperationInductionId(queryCycleTypeDetailRespDto_1.getOperationInductionId());//sourceId:57601_1
            retData.setOperateTime(queryCycleTypeDetailRespDto_1.getOperateTime());//sourceId:57602_1
        }
        if (queryInductionRecordInfoDetailComRespDto_1 != null) {
            retData.setUserId(queryInductionRecordInfoDetailComRespDto_1.getUserId());//sourceId:57603_1
            retData.setUserFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//sourceId:57606_1
            retData.setIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//sourceId:57604_1
            retData.setNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//sourceId:57605_1
        }


        return retData;
    }

    /**
     * B3-4查询周期类型排序列表（平台）[2171]
     * gen by moon at 8/10/2022, 3:46:33 AM
     */
    @Trace(operationName = "B3-4查询周期类型排序列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleTypeSortListRespDto queryCycleTypeSortList(BffQueryCycleTypeSortListReqDto reqDto) {


        QueryCycleTypeListRespDto queryCycleTypeListRespDto_1 = null;
//步骤0: D3-4查询周期类型列表 - queryCycleTypeList
        QueryCycleTypeListRespDto queryCycleTypeListRespDto = null;
        QueryCycleTypeListReqDto queryCycleTypeListReqDto = new QueryCycleTypeListReqDto();
        queryCycleTypeListReqDto.setIsArchive("FALSE");//sourceId:63141_1
        if (reqDto != null) {
            queryCycleTypeListReqDto.setCycleSystemCode(reqDto.getCycleSystemCode());//sourceId:63136_1
        }

        /*D3-4查询周期类型列表[1855]   */

        queryCycleTypeListRespDto = fwAppCycleTypeClient.queryCycleTypeList(queryCycleTypeListReqDto).getData();

        queryCycleTypeListRespDto_1 = queryCycleTypeListRespDto;

        BffQueryCycleTypeSortListRespDto retData = new BffQueryCycleTypeSortListRespDto();
        if (queryCycleTypeListRespDto_1 != null) {
            retData.setCycleTypeList(queryCycleTypeListRespDto_1.getCycleTypeList().stream().map(item -> BeanUtil.toBean(item, BffCycleTypeDto.class)).collect(Collectors.toList()));//sourceId:63146_1
        }


        return retData;
    }

    /**
     * B3-4批量修改周期类型排序（平台）[2166]
     * gen by moon at 8/10/2022, 3:46:29 AM
     */
    @Trace(operationName = "B3-4批量修改周期类型排序（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchUpdateCycleTypeSortRespDto batchUpdateCycleTypeSort(BffBatchUpdateCycleTypeSortReqDto reqDto) {


        //步骤0: D3-4批量修改周期类型排序 - batchUpdateCycleTypeSort
        BatchUpdateCycleTypeSortRespDto batchUpdateCycleTypeSortRespDto = null;
        BatchUpdateCycleTypeSortReqDto batchUpdateCycleTypeSortReqDto = new BatchUpdateCycleTypeSortReqDto();
        if (reqDto != null) {
            batchUpdateCycleTypeSortReqDto.setCycleTypeList(reqDto.getCycleTypeList().stream().map(item -> BeanUtil.toBean(item, com.wicket.okrcomponent.integration.dto.CycleTypeDto.class)).collect(Collectors.toList()));//sourceId:66777_1
        }

        /*D3-4批量修改周期类型排序[2169]   */

        batchUpdateCycleTypeSortRespDto = fwAppCycleTypeClient.batchUpdateCycleTypeSort(batchUpdateCycleTypeSortReqDto).getData();


        BffBatchUpdateCycleTypeSortRespDto retData = new BffBatchUpdateCycleTypeSortRespDto();


        return retData;
    }

    /**
     * B3-4查询周期列表（平台）[2012]
     * gen by moon at 12/6/2022, 1:40:19 AM
     */
    @Trace(operationName = "B3-4查询周期列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleListRespDto queryCycleList(BffQueryCycleListReqDto reqDto) {


        QueryCycleSortListRespDto queryCycleSortListRespDto_1 = null;
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 = null;
//步骤0: D3-4查询周期倒序列表 - queryCycleSortList
        QueryCycleSortListRespDto queryCycleSortListRespDto = null;
        QueryCycleSortListReqDto queryCycleSortListReqDto = new QueryCycleSortListReqDto();
        if (reqDto != null) {
            queryCycleSortListReqDto.setCycleStandardName(reqDto.getCycleStandardName());//SimpleFieldAssign//sourceId:361671_1
            queryCycleSortListReqDto.setCycleTypeInstanceCode(reqDto.getCycleTypeInstanceCode());//SimpleFieldAssign//sourceId:361672_1
            queryCycleSortListReqDto.setCycleTypeStandard(reqDto.getCycleTypeStandard());//SimpleFieldAssign//sourceId:361673_1
            queryCycleSortListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:361675_1
            queryCycleSortListReqDto.setPlatformData(reqDto.getPlatformData());//SimpleFieldAssign//sourceId:488718_1
            queryCycleSortListReqDto.setSpaceId(reqDto.getSpaceId());//SimpleFieldAssign//sourceId:488592_1
        }

        /*D3-4查询周期倒序列表[2008]   */
        Assert.isNull(queryCycleSortListReqDto.getIsArchive(), "B3-4查询周期列表（平台）-D3-4查询周期倒序列表-是否存档不能为空", false);
        queryCycleSortListRespDto = fwAppCycleTypeClient.queryCycleSortList(queryCycleSortListReqDto).getData();


        queryCycleSortListRespDto_1 = queryCycleSortListRespDto;

//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
        if (queryCycleSortListRespDto != null) {
            BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto = new BatchQueryInductionRecordListComReqDto();
            if (queryCycleSortListRespDto != null) {
                batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(queryCycleSortListRespDto.getCycleList().stream().map(item -> item.getOperationInductionId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:59359_1
            }

            /*D1-3批量查询就职记录列表（公共）[602]   */

            batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();


            batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
        }

        BffQueryCycleListRespDto retData = new BffQueryCycleListRespDto();
        //数据集融合  MoreListToOneSource
        if (queryCycleSortListRespDto_1 != null && !CollectionUtil.isEmpty(queryCycleSortListRespDto_1.getCycleList())) {
            for (CycleDto cycleDto : queryCycleSortListRespDto_1.getCycleList()) {
                BffCycleDto retElm = new BffCycleDto();
                if (queryCycleSortListRespDto_1 != null) {
                    retElm.setCycleId(cycleDto.getCycleId());//SimpleFieldAssign//sourceId:104127_2
                    retElm.setCycleStandardName(cycleDto.getCycleStandardName());//SimpleFieldAssign//sourceId:104128_2
                    retElm.setCycleStartTime(cycleDto.getCycleStartTime());//SimpleFieldAssign//sourceId:104129_2
                    retElm.setCycleEndTime(cycleDto.getCycleEndTime());//SimpleFieldAssign//sourceId:104130_2
                    retElm.setCycleTypeCode(cycleDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:104131_2
                    retElm.setCycleTypeInstanceCode(cycleDto.getCycleTypeInstanceCode());//SimpleFieldAssign//sourceId:104132_2
                    retElm.setCycleTypeStandard(cycleDto.getCycleTypeStandard());//SimpleFieldAssign//sourceId:104133_2
                    retElm.setPlatformData(cycleDto.getPlatformData());//SimpleFieldAssign//sourceId:104134_2
                    retElm.setSubjectLifeCycle(cycleDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:104135_2
                    retElm.setIsArchive(cycleDto.getIsArchive());//SimpleFieldAssign//sourceId:106548_2
                    retElm.setOperationInductionId(cycleDto.getOperationInductionId());//SimpleFieldAssign//sourceId:104136_2
                    retElm.setOperateTime(cycleDto.getOperateTime());//SimpleFieldAssign//sourceId:104137_2
                }
                retData.getCycleList().add(retElm);
                if (batchQueryInductionRecordListComRespDto_1 != null) {
                    for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                        if (perOrgInductionRecordDto.getInductionRecordId().equals(cycleDto.getOperationInductionId())) {
                            if (batchQueryInductionRecordListComRespDto_1 != null) {
                                retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//SimpleFieldAssign//sourceId:104140_2
                                retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//SimpleFieldAssign//sourceId:104138_2
                                retElm.setNickName(perOrgInductionRecordDto.getNickName());//SimpleFieldAssign//sourceId:104139_2
                            }
                        }
                    }
                }

            }
        }//sourceId:361680_1


        retData.setPageNum(queryCycleSortListRespDto.getPageNum());
        retData.setPageSize(queryCycleSortListRespDto.getPageSize());
        retData.setTotal(queryCycleSortListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryCycleSortListRespDto.getTotalNum()) / Double.valueOf(queryCycleSortListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B3-4修改平台周期[2011]
     * gen by moon at 12/3/2022, 8:21:17 PM
     */
    @Trace(operationName = "B3-4修改平台周期")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateCycleRespDto updateCycle(BffUpdateCycleReqDto reqDto) {


        //步骤0: D3修改平台周期(公共) - updatePlatformCycleCom
        UpdatePlatformCycleComRespDto updatePlatformCycleComRespDto = null;
        UpdatePlatformCycleComReqDto updatePlatformCycleComReqDto = new UpdatePlatformCycleComReqDto();
        if (reqDto != null) {
            updatePlatformCycleComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:484070_1
            updatePlatformCycleComReqDto.setCycleStandardName(reqDto.getCycleStandardName());//SimpleFieldAssign//sourceId:484071_1
            updatePlatformCycleComReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:484072_1
            updatePlatformCycleComReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:484073_1
            updatePlatformCycleComReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:484074_1
            updatePlatformCycleComReqDto.setCycleTypeInstanceCode(reqDto.getCycleTypeInstanceCode());//SimpleFieldAssign//sourceId:484075_1
            updatePlatformCycleComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:484076_1
        }

        /*D3修改平台周期(公共)[5386]   */
        Assert.isNull(updatePlatformCycleComReqDto.getCycleId(), "B3-4修改平台周期-D3修改平台周期(公共)-周期ID不能为空", false);
        updatePlatformCycleComRespDto = fwAppCycleTypeClient.updatePlatformCycleCom(updatePlatformCycleComReqDto).getData();


        BffUpdateCycleRespDto retData = new BffUpdateCycleRespDto();


        return retData;
    }

    /**
     * B3-4新增周期（平台）[2010]
     * gen by moon at 12/3/2022, 8:21:16 PM
     */
    @Trace(operationName = "B3-4新增周期（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddCycleRespDto addCycle(BffAddCycleReqDto reqDto) {


        AddPlatformCycleComRespDto addPlatformCycleComRespDto_1 = null;
//步骤0: D3新增平台周期(公共) - addPlatformCycleCom
        AddPlatformCycleComRespDto addPlatformCycleComRespDto = null;
        AddPlatformCycleComReqDto addPlatformCycleComReqDto = new AddPlatformCycleComReqDto();
        if (reqDto != null) {
            addPlatformCycleComReqDto.setCycleStandardName(reqDto.getCycleStandardName());//SimpleFieldAssign//sourceId:483978_1
            addPlatformCycleComReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:483979_1
            addPlatformCycleComReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:483980_1
            addPlatformCycleComReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:483982_1
            addPlatformCycleComReqDto.setCycleTypeName(reqDto.getCycleTypeName());//SimpleFieldAssign//sourceId:483983_1
            addPlatformCycleComReqDto.setCycleTypeInstanceCode(reqDto.getCycleTypeInstanceCode());//SimpleFieldAssign//sourceId:483984_1
            addPlatformCycleComReqDto.setCycleNumberShortName(reqDto.getCycleNumberShortName());//SimpleFieldAssign//sourceId:483985_1
            addPlatformCycleComReqDto.setCycleTypeStandard(reqDto.getCycleTypeStandard());//SimpleFieldAssign//sourceId:483981_1
            addPlatformCycleComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:483986_1
        }

        /*D3新增平台周期(公共)[5384]   */
        Assert.isNull(addPlatformCycleComReqDto.getCycleStandardName(), "B3-4新增周期（平台）-D3新增平台周期(公共)-周期名称不能为空", false);
        Assert.isNull(addPlatformCycleComReqDto.getCycleStartTime(), "B3-4新增周期（平台）-D3新增平台周期(公共)-周期开始时间不能为空", false);
        Assert.isNull(addPlatformCycleComReqDto.getCycleEndTime(), "B3-4新增周期（平台）-D3新增平台周期(公共)-周期结束时间不能为空", false);
        Assert.isNull(addPlatformCycleComReqDto.getCycleTypeCode(), "B3-4新增周期（平台）-D3新增平台周期(公共)-周期类型标识不能为空", false);
        Assert.isNull(addPlatformCycleComReqDto.getCycleTypeName(), "B3-4新增周期（平台）-D3新增平台周期(公共)-周期类型名称不能为空", false);
        Assert.isNull(addPlatformCycleComReqDto.getCycleTypeStandard(), "B3-4新增周期（平台）-D3新增平台周期(公共)-冗余周期类型标准化不能为空", false);
        Assert.isNull(addPlatformCycleComReqDto.getSubjectLifeCycle(), "B3-4新增周期（平台）-D3新增平台周期(公共)-主体生命周期不能为空", false);
        addPlatformCycleComRespDto = fwAppCycleTypeClient.addPlatformCycleCom(addPlatformCycleComReqDto).getData();


        addPlatformCycleComRespDto_1 = addPlatformCycleComRespDto;

        BffAddCycleRespDto retData = new BffAddCycleRespDto();
        if (addPlatformCycleComRespDto_1 != null) {
            retData.setCycleId(addPlatformCycleComRespDto_1.getCycleId());//SimpleFieldAssign//sourceId:483998_1
        }


        return retData;
    }

    /**
     * B3-4查询可存档周期类型条件（平台）[1884]
     * gen by moon at 8/10/2022, 3:44:17 AM
     */
    @Trace(operationName = "B3-4查询可存档周期类型条件（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffArchiveCycleTypeRespDto archiveCycleType(BffArchiveCycleTypeReqDto reqDto) {


        QueryCycleTypeInstanceListRespDto queryCycleTypeInstanceListRespDto_1 = null;
        QueryCycleTypeInstanceRelationshipListRespDto queryCycleTypeInstanceRelationshipListRespDto_1 = null;
//步骤0: D3-4查询周期类型实例列表 - queryCycleTypeInstanceList
        QueryCycleTypeInstanceListRespDto queryCycleTypeInstanceListRespDto = null;
        QueryCycleTypeInstanceListReqDto queryCycleTypeInstanceListReqDto = new QueryCycleTypeInstanceListReqDto();
        queryCycleTypeInstanceListReqDto.setIsArchive("FALSE");//sourceId:58673_1
        if (reqDto != null) {
            queryCycleTypeInstanceListReqDto.setCycleTypeId(reqDto.getCycleTypeId());//sourceId:58671_1
        }

        /*D3-4查询周期类型实例列表[1867]   */
        Assert.isNull(queryCycleTypeInstanceListReqDto.getCycleTypeId(), "B3-4查询可存档周期类型条件（平台）-D3-4查询周期类型实例列表-周期类型ID不能为空", false);
        Assert.isNull(queryCycleTypeInstanceListReqDto.getIsArchive(), "B3-4查询可存档周期类型条件（平台）-D3-4查询周期类型实例列表-是否存档不能为空", false);
        queryCycleTypeInstanceListRespDto = fwAppCycleTypeClient.queryCycleTypeInstanceList(queryCycleTypeInstanceListReqDto).getData();

        queryCycleTypeInstanceListRespDto_1 = queryCycleTypeInstanceListRespDto;

//步骤1: D3-4查询工作周期类型关系列表 - queryCycleTypeInstanceRelationshipList
        QueryCycleTypeInstanceRelationshipListRespDto queryCycleTypeInstanceRelationshipListRespDto = null;
        QueryCycleTypeInstanceRelationshipListReqDto queryCycleTypeInstanceRelationshipListReqDto = new QueryCycleTypeInstanceRelationshipListReqDto();
        queryCycleTypeInstanceRelationshipListReqDto.setIsArchive("FALSE");//sourceId:63250_1
        if (reqDto != null) {
            queryCycleTypeInstanceRelationshipListReqDto.setCycleTypeId(reqDto.getCycleTypeId());//sourceId:63249_1
        }

        /*D3-4查询工作周期类型关系列表[1877]   */
        Assert.isNull(queryCycleTypeInstanceRelationshipListReqDto.getCycleTypeId(), "B3-4查询可存档周期类型条件（平台）-D3-4查询工作周期类型关系列表-冗余周期类型ID不能为空", false);
        Assert.isNull(queryCycleTypeInstanceRelationshipListReqDto.getIsArchive(), "B3-4查询可存档周期类型条件（平台）-D3-4查询工作周期类型关系列表-是否存档不能为空", false);
        queryCycleTypeInstanceRelationshipListRespDto = fwAppCycleTypeClient.queryCycleTypeInstanceRelationshipList(queryCycleTypeInstanceRelationshipListReqDto).getData();

        queryCycleTypeInstanceRelationshipListRespDto_1 = queryCycleTypeInstanceRelationshipListRespDto;

        BffArchiveCycleTypeRespDto retData = new BffArchiveCycleTypeRespDto();
        if (queryCycleTypeInstanceListRespDto_1 != null) {
            retData.setCycleTypeInstanceList(queryCycleTypeInstanceListRespDto_1.getCycleTypeInstanceList().stream().map(item -> item.getCycleTypeInstanceId())
                    .collect(Collectors.toList()));//sourceId:58685_1
        }
        if (queryCycleTypeInstanceRelationshipListRespDto_1 != null) {
            retData.setCycleTypeInstanceRelationshipList(queryCycleTypeInstanceRelationshipListRespDto_1.getCycleTypeInstanceRelationshipList().stream().map(item -> item.getCycleRelationshipId())
                    .collect(Collectors.toList()));//sourceId:58686_1
        }


        return retData;
    }

    /**
     * B3-4查询关联的父周期类型关系列表（平台）[1880]
     * gen by moon at 11/27/2022, 9:22:18 PM
     */
    @Trace(operationName = "B3-4查询关联的父周期类型关系列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleTypeInstanceRelationshipListRespDto queryCycleTypeInstanceRelationshipList(BffQueryCycleTypeInstanceRelationshipListReqDto reqDto) {


        QueryCycleTypeInstanceRelationshipListRespDto queryCycleTypeInstanceRelationshipListRespDto_1 = null;
//步骤0: D3-4查询工作周期类型关系列表 - queryCycleTypeInstanceRelationshipList
        QueryCycleTypeInstanceRelationshipListRespDto queryCycleTypeInstanceRelationshipListRespDto = null;
        QueryCycleTypeInstanceRelationshipListReqDto queryCycleTypeInstanceRelationshipListReqDto = new QueryCycleTypeInstanceRelationshipListReqDto();
        if (reqDto != null) {
            queryCycleTypeInstanceRelationshipListReqDto.setCycleTypeId(reqDto.getCycleTypeId());//SimpleFieldAssign//sourceId:63251_1
            queryCycleTypeInstanceRelationshipListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:57556_1
        }

        /*D3-4查询工作周期类型关系列表[1877]   */
        Assert.isNull(queryCycleTypeInstanceRelationshipListReqDto.getCycleTypeId(), "B3-4查询关联的父周期类型关系列表（平台）-D3-4查询工作周期类型关系列表-冗余周期类型ID不能为空", false);
        Assert.isNull(queryCycleTypeInstanceRelationshipListReqDto.getIsArchive(), "B3-4查询关联的父周期类型关系列表（平台）-D3-4查询工作周期类型关系列表-是否存档不能为空", false);
        queryCycleTypeInstanceRelationshipListRespDto = fwAppCycleTypeClient.queryCycleTypeInstanceRelationshipList(queryCycleTypeInstanceRelationshipListReqDto).getData();


        queryCycleTypeInstanceRelationshipListRespDto_1 = queryCycleTypeInstanceRelationshipListRespDto;

        BffQueryCycleTypeInstanceRelationshipListRespDto retData = new BffQueryCycleTypeInstanceRelationshipListRespDto();
        if (queryCycleTypeInstanceRelationshipListRespDto_1 != null) {
            retData.setCycleTypeInstanceRelationshipList(//objList-to-objLists
                    queryCycleTypeInstanceRelationshipListRespDto_1.getCycleTypeInstanceRelationshipList().stream().map(item -> {
                        BffCycleTypeInstanceRelationshipDto elm = new BffCycleTypeInstanceRelationshipDto();
                        if (item != null) {
                            elm.setCycleRelationshipId(item.getCycleRelationshipId());//SimpleFieldAssign//sourceId:31563_2
                            elm.setParentCycleTypeId(item.getParentCycleTypeId());//SimpleFieldAssign//sourceId:121427_2
                            elm.setRelationCycleTypeCode(item.getRelationCycleTypeCode());//SimpleFieldAssign//sourceId:31565_2
                            elm.setCycleTypeStandard(item.getParentCycleTypeStandard());//SimpleFieldAssign//sourceId:121485_2
                            elm.setParentCycleTypeName(item.getParentCycleTypeName());//SimpleFieldAssign//sourceId:121428_2
                            elm.setSubCycleNumber(item.getSubCycleNumber());//SimpleFieldAssign//sourceId:31566_2
                            elm.setIsInterim(item.getIsInterim());//SimpleFieldAssign//sourceId:31567_2
                            elm.setIsArchive(item.getIsArchive());//SimpleFieldAssign//sourceId:35152_2
                            elm.setSubjectLifeCycle(item.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:31568_2
                        }
                        return elm;
                    }).collect(Collectors.toList()));//objList-to-objLists//sourceId:57563_1
        }


        retData.setPageNum(queryCycleTypeInstanceRelationshipListRespDto.getPageNum());
        retData.setPageSize(queryCycleTypeInstanceRelationshipListRespDto.getPageSize());
        retData.setTotal(queryCycleTypeInstanceRelationshipListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryCycleTypeInstanceRelationshipListRespDto.getTotalNum()) / Double.valueOf(queryCycleTypeInstanceRelationshipListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B3-4新增工作周期类型关系 (平台)[1878]
     * gen by moon at 11/27/2022, 9:22:16 PM
     */
    @Trace(operationName = "B3-4新增工作周期类型关系 (平台)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddCycleTypeInstanceRelationshipRespDto addCycleTypeInstanceRelationship(BffAddCycleTypeInstanceRelationshipReqDto reqDto) {


        AddCycleTypeInstanceRelationshipRespDto addCycleTypeInstanceRelationshipRespDto_1 = null;
//步骤0: D3-4新增工作周期类型关系 - addCycleTypeInstanceRelationship
        AddCycleTypeInstanceRelationshipRespDto addCycleTypeInstanceRelationshipRespDto = null;
        AddCycleTypeInstanceRelationshipReqDto addCycleTypeInstanceRelationshipReqDto = new AddCycleTypeInstanceRelationshipReqDto();
        if (reqDto != null) {
            addCycleTypeInstanceRelationshipReqDto.setCycleTypeId(reqDto.getCycleTypeId());//SimpleFieldAssign//sourceId:449867_1
            addCycleTypeInstanceRelationshipReqDto.setParentCycleTypeId(reqDto.getParentCycleTypeId());//SimpleFieldAssign//sourceId:449868_1
            addCycleTypeInstanceRelationshipReqDto.setSubCycleNumber(reqDto.getSubCycleNumber());//SimpleFieldAssign//sourceId:63275_1
            addCycleTypeInstanceRelationshipReqDto.setIsInterim(reqDto.getIsInterim());//SimpleFieldAssign//sourceId:63276_1
            addCycleTypeInstanceRelationshipReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:57467_1
        }

        /*D3-4新增工作周期类型关系[1875]   */
        Assert.isNull(addCycleTypeInstanceRelationshipReqDto.getCycleTypeId(), "B3-4新增工作周期类型关系 (平台)-D3-4新增工作周期类型关系-冗余周期类型ID不能为空", false);
        Assert.isNull(addCycleTypeInstanceRelationshipReqDto.getParentCycleTypeId(), "B3-4新增工作周期类型关系 (平台)-D3-4新增工作周期类型关系-关联父周期类型ID不能为空", false);
        Assert.isNull(addCycleTypeInstanceRelationshipReqDto.getSubCycleNumber(), "B3-4新增工作周期类型关系 (平台)-D3-4新增工作周期类型关系-子工作周期数量不能为空", false);
        Assert.isNull(addCycleTypeInstanceRelationshipReqDto.getIsInterim(), "B3-4新增工作周期类型关系 (平台)-D3-4新增工作周期类型关系-是否中期不能为空", false);
        Assert.isNull(addCycleTypeInstanceRelationshipReqDto.getSubjectLifeCycle(), "B3-4新增工作周期类型关系 (平台)-D3-4新增工作周期类型关系-主体生命周期不能为空", false);
        addCycleTypeInstanceRelationshipRespDto = fwAppCycleTypeClient.addCycleTypeInstanceRelationship(addCycleTypeInstanceRelationshipReqDto).getData();


        addCycleTypeInstanceRelationshipRespDto_1 = addCycleTypeInstanceRelationshipRespDto;

        BffAddCycleTypeInstanceRelationshipRespDto retData = new BffAddCycleTypeInstanceRelationshipRespDto();
        if (addCycleTypeInstanceRelationshipRespDto_1 != null) {
            retData.setCycleRelationshipId(addCycleTypeInstanceRelationshipRespDto_1.getCycleRelationshipId());//SimpleFieldAssign//sourceId:57474_1
        }


        return retData;
    }

    /**
     * B3-4查询周期类型实例列表（平台）[1870]
     * gen by moon at 8/10/2022, 3:44:07 AM
     */
    @Trace(operationName = "B3-4查询周期类型实例列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleTypeInstanceListRespDto queryCycleTypeInstanceList(BffQueryCycleTypeInstanceListReqDto reqDto) {


        QueryCycleTypeInstanceListRespDto queryCycleTypeInstanceListRespDto_1 = null;
//步骤0: D3-4查询周期类型实例列表 - queryCycleTypeInstanceList
        QueryCycleTypeInstanceListRespDto queryCycleTypeInstanceListRespDto = null;
        QueryCycleTypeInstanceListReqDto queryCycleTypeInstanceListReqDto = new QueryCycleTypeInstanceListReqDto();
        if (reqDto != null) {
            queryCycleTypeInstanceListReqDto.setCycleTypeId(reqDto.getCycleTypeId());//sourceId:57544_1
            queryCycleTypeInstanceListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:57546_1
        }

        /*D3-4查询周期类型实例列表[1867]   */
        Assert.isNull(queryCycleTypeInstanceListReqDto.getCycleTypeId(), "B3-4查询周期类型实例列表（平台）-D3-4查询周期类型实例列表-周期类型ID不能为空", false);
        Assert.isNull(queryCycleTypeInstanceListReqDto.getIsArchive(), "B3-4查询周期类型实例列表（平台）-D3-4查询周期类型实例列表-是否存档不能为空", false);
        queryCycleTypeInstanceListRespDto = fwAppCycleTypeClient.queryCycleTypeInstanceList(queryCycleTypeInstanceListReqDto).getData();

        queryCycleTypeInstanceListRespDto_1 = queryCycleTypeInstanceListRespDto;

        BffQueryCycleTypeInstanceListRespDto retData = new BffQueryCycleTypeInstanceListRespDto();
        if (queryCycleTypeInstanceListRespDto_1 != null) {
            retData.setCycleTypeInstanceList(queryCycleTypeInstanceListRespDto_1.getCycleTypeInstanceList().stream().map(item -> BeanUtil.toBean(item, BffCycleTypeInstanceDto.class)).collect(Collectors.toList()));//sourceId:57552_1
        }


        return retData;
    }

    /**
     * B3-4修改周期类型实例（平台）[1869]
     * gen by moon at 8/10/2022, 3:44:03 AM
     */
    @Trace(operationName = "B3-4修改周期类型实例（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateCycleTypeInstanceRespDto updateCycleTypeInstance(BffUpdateCycleTypeInstanceReqDto reqDto) {


        //步骤0: D3-4修改周期类型实例 - updateCycleTypeInstance
        UpdateCycleTypeInstanceRespDto updateCycleTypeInstanceRespDto = null;
        UpdateCycleTypeInstanceReqDto updateCycleTypeInstanceReqDto = new UpdateCycleTypeInstanceReqDto();
        if (reqDto != null) {
            updateCycleTypeInstanceReqDto.setCycleTypeInstanceId(reqDto.getCycleTypeInstanceId());//sourceId:57500_1
            updateCycleTypeInstanceReqDto.setCycleTypeInstanceCode(reqDto.getCycleTypeInstanceCode());//sourceId:57502_1
            updateCycleTypeInstanceReqDto.setCycleStandardName(reqDto.getCycleStandardName());//sourceId:57503_1
            updateCycleTypeInstanceReqDto.setCycleNumberShortName(reqDto.getCycleNumberShortName());//sourceId:57504_1
            updateCycleTypeInstanceReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:57506_1
        }

        /*D3-4修改周期类型实例[1866]   */
        Assert.isNull(updateCycleTypeInstanceReqDto.getCycleTypeInstanceId(), "B3-4修改周期类型实例（平台）-D3-4修改周期类型实例-周期类型实例ID不能为空", false);
        updateCycleTypeInstanceRespDto = fwAppCycleTypeClient.updateCycleTypeInstance(updateCycleTypeInstanceReqDto).getData();


        BffUpdateCycleTypeInstanceRespDto retData = new BffUpdateCycleTypeInstanceRespDto();


        return retData;
    }

    /**
     * B3-4新增周期类型实例（平台）[1868]
     * gen by moon at 8/10/2022, 3:43:59 AM
     */
    @Trace(operationName = "B3-4新增周期类型实例（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddCycleTypeInstanceRespDto addCycleTypeInstance(BffAddCycleTypeInstanceReqDto reqDto) {


        AddCycleTypeInstanceRespDto addCycleTypeInstanceRespDto_1 = null;
//步骤0: D3-4新增周期类型实例 - addCycleTypeInstance
        AddCycleTypeInstanceRespDto addCycleTypeInstanceRespDto = null;
        AddCycleTypeInstanceReqDto addCycleTypeInstanceReqDto = new AddCycleTypeInstanceReqDto();
        if (reqDto != null) {
            addCycleTypeInstanceReqDto.setCycleTypeId(reqDto.getCycleTypeId());//sourceId:57449_1
            addCycleTypeInstanceReqDto.setCycleTypeInstanceCode(reqDto.getCycleTypeInstanceCode());//sourceId:57450_1
            addCycleTypeInstanceReqDto.setCycleStandardName(reqDto.getCycleStandardName());//sourceId:57451_1
            addCycleTypeInstanceReqDto.setCycleNumberShortName(reqDto.getCycleNumberShortName());//sourceId:57452_1
            addCycleTypeInstanceReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:57454_1
        }

        /*D3-4新增周期类型实例[1865]   */
        Assert.isNull(addCycleTypeInstanceReqDto.getCycleTypeId(), "B3-4新增周期类型实例（平台）-D3-4新增周期类型实例-周期类型ID不能为空", false);
        Assert.isNull(addCycleTypeInstanceReqDto.getCycleTypeInstanceCode(), "B3-4新增周期类型实例（平台）-D3-4新增周期类型实例-周期类型实例标识不能为空", false);
        Assert.isNull(addCycleTypeInstanceReqDto.getCycleStandardName(), "B3-4新增周期类型实例（平台）-D3-4新增周期类型实例-周期类型实例名称不能为空", false);
        Assert.isNull(addCycleTypeInstanceReqDto.getCycleNumberShortName(), "B3-4新增周期类型实例（平台）-D3-4新增周期类型实例-周期类型实例简称不能为空", false);
        Assert.isNull(addCycleTypeInstanceReqDto.getSubjectLifeCycle(), "B3-4新增周期类型实例（平台）-D3-4新增周期类型实例-主体生命周期不能为空", false);
        addCycleTypeInstanceRespDto = fwAppCycleTypeClient.addCycleTypeInstance(addCycleTypeInstanceReqDto).getData();

        addCycleTypeInstanceRespDto_1 = addCycleTypeInstanceRespDto;

        BffAddCycleTypeInstanceRespDto retData = new BffAddCycleTypeInstanceRespDto();
        if (addCycleTypeInstanceRespDto_1 != null) {
            retData.setCycleTypeInstanceId(addCycleTypeInstanceRespDto_1.getCycleTypeInstanceId());//sourceId:57462_1
        }


        return retData;
    }

    /**
     * B3-4查询周期类型列表（平台）[1859]
     * gen by moon at 8/10/2022, 3:43:55 AM
     */
    @Trace(operationName = "B3-4查询周期类型列表（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryCycleTypeListRespDto queryCycleTypeList(BffQueryCycleTypeListReqDto reqDto) {


        QueryCycleTypeListRespDto queryCycleTypeListRespDto_1 = null;
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto_1 = null;
//步骤0: D3-4查询周期类型列表 - queryCycleTypeList
        QueryCycleTypeListRespDto queryCycleTypeListRespDto = null;
        QueryCycleTypeListReqDto queryCycleTypeListReqDto = new QueryCycleTypeListReqDto();
        if (reqDto != null) {
            queryCycleTypeListReqDto.setCycleSystemCode(reqDto.getCycleSystemCode());//sourceId:57528_1
            queryCycleTypeListReqDto.setIsWorkCycleType(reqDto.getIsWorkCycleType());//sourceId:57530_1
            queryCycleTypeListReqDto.setCycleTypeStandard(reqDto.getCycleTypeStandard());//sourceId:57529_1
            queryCycleTypeListReqDto.setCycleTypeUsage(reqDto.getCycleTypeUsage());//sourceId:57531_1
            queryCycleTypeListReqDto.setIsArchive(reqDto.getIsArchive());//sourceId:57533_1
        }

        /*D3-4查询周期类型列表[1855]   */
        Assert.isNull(queryCycleTypeListReqDto.getCycleSystemCode(), "B3-4查询周期类型列表（平台）-D3-4查询周期类型列表-周期体系类型标识不能为空", false);
        Assert.isNull(queryCycleTypeListReqDto.getIsWorkCycleType(), "B3-4查询周期类型列表（平台）-D3-4查询周期类型列表-是否工作周期不能为空", false);
        Assert.isNull(queryCycleTypeListReqDto.getIsArchive(), "B3-4查询周期类型列表（平台）-D3-4查询周期类型列表-是否存档不能为空", false);
        queryCycleTypeListRespDto = fwAppCycleTypeClient.queryCycleTypeList(queryCycleTypeListReqDto).getData();

        queryCycleTypeListRespDto_1 = queryCycleTypeListRespDto;

//步骤1: D1-3批量查询就职记录列表（公共） - batchQueryInductionRecordListCom
        BatchQueryInductionRecordListComRespDto batchQueryInductionRecordListComRespDto = null;
        if (queryCycleTypeListRespDto != null) {
            BatchQueryInductionRecordListComReqDto batchQueryInductionRecordListComReqDto = new BatchQueryInductionRecordListComReqDto();
            if (queryCycleTypeListRespDto != null) {
                batchQueryInductionRecordListComReqDto.setPerOrgInductionRecordList(queryCycleTypeListRespDto.getCycleTypeList().stream().map(item -> item.getOperationInductionId())
                        .collect(Collectors.toList()));//sourceId:57535_1
            }

            /*D1-3批量查询就职记录列表（公共）[602]   */

            batchQueryInductionRecordListComRespDto = fwBaseInductionRecordClient.batchQueryInductionRecordListCom(batchQueryInductionRecordListComReqDto).getData();

            batchQueryInductionRecordListComRespDto_1 = batchQueryInductionRecordListComRespDto;
        }

        BffQueryCycleTypeListRespDto retData = new BffQueryCycleTypeListRespDto();
        //数据集融合
        if (queryCycleTypeListRespDto_1 != null && !CollectionUtil.isEmpty(queryCycleTypeListRespDto_1.getCycleTypeList())) {
            for (CycleTypeDto cycleTypeDto : queryCycleTypeListRespDto_1.getCycleTypeList()) {
                BffCycleTypeDto retElm = new BffCycleTypeDto();
                if (queryCycleTypeListRespDto_1 != null) {
                    retElm.setCycleTypeId(cycleTypeDto.getCycleTypeId());//sourceId:31508_2
                    retElm.setCycleTypeCode(cycleTypeDto.getCycleTypeCode());//sourceId:31510_2
                    retElm.setCycleTypeName(cycleTypeDto.getCycleTypeName());//sourceId:31512_2
                    retElm.setOrderNumber(cycleTypeDto.getOrderNumber());//sourceId:36506_2
                    retElm.setSubjectLifeCycle(cycleTypeDto.getSubjectLifeCycle());//sourceId:31515_2
                    retElm.setOperationInductionId(cycleTypeDto.getOperationInductionId());//sourceId:31516_2
                    retElm.setIsArchive(cycleTypeDto.getIsArchive());//sourceId:58894_2
                    retElm.setOperateTime(cycleTypeDto.getOperateTime());//sourceId:31517_2
                }
                retData.getCycleTypeList().add(retElm);
                if (batchQueryInductionRecordListComRespDto_1 != null) {
                    for (PerOrgInductionRecordDto perOrgInductionRecordDto : batchQueryInductionRecordListComRespDto_1.getPerOrgInductionRecordList()) {
                        if (perOrgInductionRecordDto.getInductionRecordId().equals(cycleTypeDto.getOperationInductionId())) {
                            if (batchQueryInductionRecordListComRespDto_1 != null) {
                                retElm.setUserId(perOrgInductionRecordDto.getUserId());//sourceId:38940_2
                                retElm.setUserFace(perOrgInductionRecordDto.getUserFace());//sourceId:38943_2
                                retElm.setIdCardName(perOrgInductionRecordDto.getIdCardName());//sourceId:38941_2
                                retElm.setNickName(perOrgInductionRecordDto.getNickName());//sourceId:38942_2
                            }
                        }
                    }
                }

            }
        }//sourceId:57543_1


        retData.setPageNum(queryCycleTypeListRespDto.getPageNum());
        retData.setPageSize(queryCycleTypeListRespDto.getPageSize());
        retData.setTotal(queryCycleTypeListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryCycleTypeListRespDto.getTotalNum()) / Double.valueOf(queryCycleTypeListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B3-4修改周期类型（平台）[1858]
     * gen by moon at 8/10/2022, 3:43:50 AM
     */
    @Trace(operationName = "B3-4修改周期类型（平台）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateCycleTypeRespDto updateCycleType(BffUpdateCycleTypeReqDto reqDto) {


        //步骤0: D3-4修改周期类型 - updateCycleType
        UpdateCycleTypeRespDto updateCycleTypeRespDto = null;
        UpdateCycleTypeReqDto updateCycleTypeReqDto = new UpdateCycleTypeReqDto();
        if (reqDto != null) {
            updateCycleTypeReqDto.setCycleTypeId(reqDto.getCycleTypeId());//sourceId:57475_1
            updateCycleTypeReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//sourceId:57477_1
            updateCycleTypeReqDto.setCycleTypeName(reqDto.getCycleTypeName());//sourceId:57479_1
            updateCycleTypeReqDto.setCycleTypeStandard(reqDto.getCycleTypeStandard());//sourceId:57480_1
            updateCycleTypeReqDto.setCycleTypeUsage(reqDto.getCycleTypeUsage());//sourceId:57482_1
            updateCycleTypeReqDto.setCycleSystemCode(reqDto.getCycleSystemCode());//sourceId:57476_1
            updateCycleTypeReqDto.setIsWorkCycleType(reqDto.getIsWorkCycleType());//sourceId:57481_1
            updateCycleTypeReqDto.setCustomCycleTypeCode(reqDto.getCustomCycleTypeCode());//sourceId:57484_1
            updateCycleTypeReqDto.setCustomCycleTypeNum(reqDto.getCustomCycleTypeNum());//sourceId:57485_1
            updateCycleTypeReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//sourceId:57486_1
        }

        /*D3-4修改周期类型[1854]   */
        Assert.isNull(updateCycleTypeReqDto.getCycleTypeId(), "B3-4修改周期类型（平台）-D3-4修改周期类型-周期类型ID不能为空", false);
        updateCycleTypeRespDto = fwAppCycleTypeClient.updateCycleType(updateCycleTypeReqDto).getData();


        BffUpdateCycleTypeRespDto retData = new BffUpdateCycleTypeRespDto();


        return retData;
    }

    /**
     * B3-4查询关联的子周期类型关系列表(管理)[5260]
     * gen by moon at 11/27/2022, 9:22:21 PM
     */
    @Trace(operationName = "B3-4查询关联的子周期类型关系列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryRelevancySubCycleTypeListRespDto queryRelevancySubCycleTypeList(BffQueryRelevancySubCycleTypeListReqDto reqDto) {


        QueryCycleTypeInstanceRelationshipListRespDto queryCycleTypeInstanceRelationshipListRespDto_1 = null;
//步骤0: D3-4查询工作周期类型关系列表 - queryCycleTypeInstanceRelationshipList
        QueryCycleTypeInstanceRelationshipListRespDto queryCycleTypeInstanceRelationshipListRespDto = null;
        QueryCycleTypeInstanceRelationshipListReqDto queryCycleTypeInstanceRelationshipListReqDto = new QueryCycleTypeInstanceRelationshipListReqDto();
        if (reqDto != null) {
            queryCycleTypeInstanceRelationshipListReqDto.setParentCycleTypeId(reqDto.getParentCycleTypeId());//SimpleFieldAssign//sourceId:449632_1
            queryCycleTypeInstanceRelationshipListReqDto.setIsArchive(reqDto.getIsArchive());//SimpleFieldAssign//sourceId:449626_1
        }

        /*D3-4查询工作周期类型关系列表[1877]   */
        Assert.isNull(queryCycleTypeInstanceRelationshipListReqDto.getParentCycleTypeId(), "B3-4查询关联的子周期类型关系列表(管理)-D3-4查询工作周期类型关系列表-关联父周期类型ID不能为空", false);
        Assert.isNull(queryCycleTypeInstanceRelationshipListReqDto.getIsArchive(), "B3-4查询关联的子周期类型关系列表(管理)-D3-4查询工作周期类型关系列表-是否存档不能为空", false);
        queryCycleTypeInstanceRelationshipListRespDto = fwAppCycleTypeClient.queryCycleTypeInstanceRelationshipList(queryCycleTypeInstanceRelationshipListReqDto).getData();


        queryCycleTypeInstanceRelationshipListRespDto_1 = queryCycleTypeInstanceRelationshipListRespDto;

        BffQueryRelevancySubCycleTypeListRespDto retData = new BffQueryRelevancySubCycleTypeListRespDto();
        if (queryCycleTypeInstanceRelationshipListRespDto_1 != null) {
            retData.setCycleTypeInstanceRelationshipList(//objList-to-objLists
                    queryCycleTypeInstanceRelationshipListRespDto_1.getCycleTypeInstanceRelationshipList().stream().map(item -> {
                        BffCycleTypeInstanceRelationshipDto elm = new BffCycleTypeInstanceRelationshipDto();
                        if (item != null) {
                            elm.setCycleRelationshipId(item.getCycleRelationshipId());//SimpleFieldAssign//sourceId:121440_2
                            elm.setSubCycleTypeId(item.getSubCycleTypeId());//SimpleFieldAssign//sourceId:121441_2
                            elm.setSubCycleTypeCode(item.getSubCycleTypeCode());//SimpleFieldAssign//sourceId:121442_2
                            elm.setCycleTypeStandard(item.getSubCycleTypeStandard());//SimpleFieldAssign//sourceId:121483_2
                            elm.setSubCycleTypeName(item.getSubCycleTypeName());//SimpleFieldAssign//sourceId:121443_2
                            elm.setSubCycleNumber(item.getSubCycleNumber());//SimpleFieldAssign//sourceId:121444_2
                            elm.setIsInterim(item.getIsInterim());//SimpleFieldAssign//sourceId:121448_2
                            elm.setIsArchive(item.getIsArchive());//SimpleFieldAssign//sourceId:121451_2
                            elm.setSubjectLifeCycle(item.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:121449_2
                        }
                        return elm;
                    }).collect(Collectors.toList()));//objList-to-objLists//sourceId:449634_1
        }


        retData.setPageNum(queryCycleTypeInstanceRelationshipListRespDto.getPageNum());
        retData.setPageSize(queryCycleTypeInstanceRelationshipListRespDto.getPageSize());
        retData.setTotal(queryCycleTypeInstanceRelationshipListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryCycleTypeInstanceRelationshipListRespDto.getTotalNum()) / Double.valueOf(queryCycleTypeInstanceRelationshipListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B3批量查询租户周期(管理)[5285]
     * gen by moon at 2/24/2023, 4:59:43 AM
     */
    @Trace(operationName = "B3批量查询租户周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchQueryTenantCycleRespDto batchQueryTenantCycle(BffBatchQueryTenantCycleReqDto reqDto) {


        QueryTenantCycleListRespDto queryTenantCycleListRespDto_1 = null;
//步骤0: D3查询租户周期列表 - queryTenantCycleList
        QueryTenantCycleListRespDto queryTenantCycleListRespDto = null;
        QueryTenantCycleListReqDto queryTenantCycleListReqDto = new QueryTenantCycleListReqDto();
        if (reqDto != null) {
            queryTenantCycleListReqDto.setComTxtField(reqDto.getTenantCycleNavigationValue());//SimpleFieldAssign//sourceId:456926_1
            queryTenantCycleListReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:458999_1
        }

        /*D3查询租户周期列表[5283]   */
        Assert.isNull(queryTenantCycleListReqDto.getComTxtField(), "B3批量查询租户周期(管理)-D3查询租户周期列表-通用文本字段不能为空", false);
        Assert.isNull(queryTenantCycleListReqDto.getSubjectLifeCycle(), "B3批量查询租户周期(管理)-D3查询租户周期列表-主体生命周期不能为空", false);
        queryTenantCycleListRespDto = fwAppCycleTypeClient.queryTenantCycleList(queryTenantCycleListReqDto).getData();


        queryTenantCycleListRespDto_1 = queryTenantCycleListRespDto;

        BffBatchQueryTenantCycleRespDto retData = new BffBatchQueryTenantCycleRespDto();
        if (queryTenantCycleListRespDto_1 != null) {
            retData.setTenantCycleList(queryTenantCycleListRespDto_1.getCycleList().stream().map(item -> BeanUtil.toBean(item, BffTenantCycleDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:456822_1
        }


        retData.setPageNum(queryTenantCycleListRespDto.getPageNum());
        retData.setPageSize(queryTenantCycleListRespDto.getPageSize());
        retData.setTotal(queryTenantCycleListRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryTenantCycleListRespDto.getTotalNum()) / Double.valueOf(queryTenantCycleListRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B3查询租户周期类型列表ByCodes(管理)[5292]
     * gen by moon at 11/26/2022, 6:27:01 PM
     */
    @Trace(operationName = "B3查询租户周期类型列表ByCodes(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchQueryTenantCycleTypeListByCodesRespDto batchQueryTenantCycleTypeListByCodes(BffBatchQueryTenantCycleTypeListByCodesReqDto reqDto) {


        QueryTenantCycleTypeListRespDto queryTenantCycleTypeListRespDto_1 = null;
//步骤0: D3查询租户周期类型列表 - queryTenantCycleTypeList
        QueryTenantCycleTypeListRespDto queryTenantCycleTypeListRespDto = null;
        QueryTenantCycleTypeListReqDto queryTenantCycleTypeListReqDto = new QueryTenantCycleTypeListReqDto();
        if (reqDto != null) {
            queryTenantCycleTypeListReqDto.setComTxtField(reqDto.getTenantCycleNavigationValue());//SimpleFieldAssign//sourceId:458460_1
        }

        /*D3查询租户周期类型列表[5290]   */
        Assert.isNull(queryTenantCycleTypeListReqDto.getComTxtField(), "B3查询租户周期类型列表ByCodes(管理)-D3查询租户周期类型列表-通用文本字段不能为空", false);
        queryTenantCycleTypeListRespDto = fwAppCycleTypeClient.queryTenantCycleTypeList(queryTenantCycleTypeListReqDto).getData();


        queryTenantCycleTypeListRespDto_1 = queryTenantCycleTypeListRespDto;

        BffBatchQueryTenantCycleTypeListByCodesRespDto retData = new BffBatchQueryTenantCycleTypeListByCodesRespDto();
        if (queryTenantCycleTypeListRespDto_1 != null) {
            retData.setTenantCycleTypeList(queryTenantCycleTypeListRespDto_1.getTenantCycleTypeList().stream().map(item -> BeanUtil.toBean(item, BffTenantCycleTypeDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:458463_1
        }


        return retData;
    }

    /**
     * B3新增租户周期(管理)[5293]
     * gen by moon at 12/3/2022, 8:21:19 PM
     */
    @Trace(operationName = "B3新增租户周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddTenantCycleRespDto addTenantCycle(BffAddTenantCycleReqDto reqDto) {


        AddSpaceCycleComRespDto addSpaceCycleComRespDto_1 = null;
//步骤0: D3新增租户周期(公共) - addSpaceCycleCom
        AddSpaceCycleComRespDto addSpaceCycleComRespDto = null;
        AddSpaceCycleComReqDto addSpaceCycleComReqDto = new AddSpaceCycleComReqDto();
        if (reqDto != null) {
            addSpaceCycleComReqDto.setCycleStandardName(reqDto.getCycleStandardName());//SimpleFieldAssign//sourceId:483962_1
            addSpaceCycleComReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:483963_1
            addSpaceCycleComReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:483964_1
            addSpaceCycleComReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:483965_1
            addSpaceCycleComReqDto.setCycleTypeName(reqDto.getCycleTypeName());//SimpleFieldAssign//sourceId:483966_1
            addSpaceCycleComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:483967_1
        }

        /*D3新增租户周期(公共)[5385]   */
        Assert.isNull(addSpaceCycleComReqDto.getCycleStandardName(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期名称不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleStartTime(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期开始时间不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleEndTime(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期结束时间不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleTypeCode(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期类型标识不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getCycleTypeName(), "B3新增租户周期(管理)-D3新增租户周期(公共)-周期类型名称不能为空", false);
        Assert.isNull(addSpaceCycleComReqDto.getSubjectLifeCycle(), "B3新增租户周期(管理)-D3新增租户周期(公共)-主体生命周期不能为空", false);
        addSpaceCycleComRespDto = fwAppCycleTypeClient.addSpaceCycleCom(addSpaceCycleComReqDto).getData();


        addSpaceCycleComRespDto_1 = addSpaceCycleComRespDto;

        BffAddTenantCycleRespDto retData = new BffAddTenantCycleRespDto();
        if (addSpaceCycleComRespDto_1 != null) {
            retData.setCycleId(addSpaceCycleComRespDto_1.getCycleId());//SimpleFieldAssign//sourceId:483977_1
        }


        return retData;
    }

    /**
     * B3修改租户周期(管理)[5294]
     * gen by moon at 12/3/2022, 8:21:21 PM
     */
    @Trace(operationName = "B3修改租户周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateTenantCycleRespDto updateTenantCycle(BffUpdateTenantCycleReqDto reqDto) {


        //步骤0: D3修改租户周期(公共) - updateTenantCycleCom
        UpdateTenantCycleComRespDto updateTenantCycleComRespDto = null;
        UpdateTenantCycleComReqDto updateTenantCycleComReqDto = new UpdateTenantCycleComReqDto();
        if (reqDto != null) {
            updateTenantCycleComReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:484168_1
            updateTenantCycleComReqDto.setCycleStandardName(reqDto.getCycleStandardName());//SimpleFieldAssign//sourceId:484169_1
            updateTenantCycleComReqDto.setCycleStartTime(reqDto.getCycleStartTime());//SimpleFieldAssign//sourceId:484170_1
            updateTenantCycleComReqDto.setCycleEndTime(reqDto.getCycleEndTime());//SimpleFieldAssign//sourceId:484171_1
            updateTenantCycleComReqDto.setCycleTypeCode(reqDto.getCycleTypeCode());//SimpleFieldAssign//sourceId:484172_1
            updateTenantCycleComReqDto.setSubjectLifeCycle(reqDto.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:484174_1
        }

        /*D3修改租户周期(公共)[5387]   */
        Assert.isNull(updateTenantCycleComReqDto.getCycleId(), "B3修改租户周期(管理)-D3修改租户周期(公共)-周期ID不能为空", false);
        updateTenantCycleComRespDto = fwAppCycleTypeClient.updateTenantCycleCom(updateTenantCycleComReqDto).getData();


        BffUpdateTenantCycleRespDto retData = new BffUpdateTenantCycleRespDto();


        return retData;
    }

    /**
     * B3删除平台周期(管理)[5389]
     * gen by moon at 12/3/2022, 8:21:22 PM
     */
    @Trace(operationName = "B3删除平台周期(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeletePlatformCycleRespDto deletePlatformCycle(BffDeletePlatformCycleReqDto reqDto) {


        //步骤0: D3删除平台周期 - deletePlatformCycle
        DeletePlatformCycleRespDto deletePlatformCycleRespDto = null;
        DeletePlatformCycleReqDto deletePlatformCycleReqDto = new DeletePlatformCycleReqDto();
        if (reqDto != null) {
            deletePlatformCycleReqDto.setCycleId(reqDto.getCycleId());//SimpleFieldAssign//sourceId:485023_1
        }

        /*D3删除平台周期[5388]   */
        Assert.isNull(deletePlatformCycleReqDto.getCycleId(), "B3删除平台周期(管理)-D3删除平台周期-周期ID不能为空", false);
        deletePlatformCycleRespDto = fwAppCycleTypeClient.deletePlatformCycle(deletePlatformCycleReqDto).getData();


        BffDeletePlatformCycleRespDto retData = new BffDeletePlatformCycleRespDto();


        return retData;
    }
    //
}
